﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Eventory_Product
{
    class Program
    {
        static void Main(string[] args)
        {
            main objMain = new main();
            objMain.start();
        }
    }

    class main
    {
        private int Menu()
        {
            int choose = 0;
            Console.WriteLine("========HE THONG QUAN LY HANG NHAP KHO========");
            Console.WriteLine("                     +++                      ");
            Console.WriteLine("\n\nChuc nang he thong");
            Console.WriteLine("\t1. Them moi san pham");
            Console.WriteLine("\t2. Sua san pham");
            Console.WriteLine("\t3. Xoa san pham");
            Console.WriteLine("\t4. Tim san pham theo MA");
            Console.WriteLine("\t5. Tim san pham theo TEN");
            Console.WriteLine("\t6. Thong ke san pham ton kho");
            Console.WriteLine("\t7. Thoat");
            Console.Write("Moi chon chuc nang thuc hien: ");

            try
            {
                choose = Convert.ToInt16(Console.ReadLine());
            }
            catch (Exception ex)
            {
                choose = 0;
            }
            
            while (choose < 1 || choose > 7)
            {
                try
                {
                    Console.WriteLine("Chuc nang khong san sang.\nMoi nhap lai: ");
                    choose = Convert.ToInt16(Console.ReadLine());
                }
                catch (Exception ex)
                {
                    choose = 0;
                }
            }
            return choose;

        }
        public void start()
        {
            switch (Menu())
            {
                case 1:
                    ThemSP();
                    break;
                case 2:
                    SuaSP();
                    break;
                case 3:
                    XoaSP();
                    break;
                case 4:
                    TimTenSP();
                    break;
                case 5:
                    TimMaSP();
                    break;
                case 6:
                    ThongKeSP();
                    break;
                case 7:
                    Thoat();
                    break;    
            }
        
        }
        private void ThemSP()
        {
            Console.WriteLine("Nhap ma SP");
        }

        private void SuaSP()
        {

        }

        private void XoaSP()
        {

        }

        private void TimTenSP()
        {

        }

        private void TimMaSP()
        {

        }

        private void ThongKeSP()
        {

        }

        private void Thoat()
        {
            Environment.Exit(0);
        }
    }
}
